<?php
/**
 * 1.入口文件
 * 2.加载函数库
 * 3.启动框架
 */

define('MYFW', realpath('/wamp64/www/Myframework/'));
define('CORE', MYFW.'/core');
define('APP', MYFW.'/app');
define('MODULE', 'app');
define('DEBUG', true);

include 'vendor/autoload.php';

if (DEBUG) {
	$whoops = new \Whoops\Run;
	$errorTitle = '出错了';
	$option = new \Whoops\Handler\PrettyPageHandler;
	$option->setPageTitle($errorTitle);
	$whoops->pushHandler($option);
	$whoops->register();
	ini_set('display_error', 'On');
} else {
	ini_set('display_error', 'Off');
}


include CORE.'/common/function.php';

include CORE.'/main.php';

spl_autoload_register('\core\main::load');

\core\main::run();
